package com.edu.entity;

import java.time.LocalDateTime;

/**
 * 评论类
 */
public class Comment {
    private int id; //id
    private String username; //评论用户
    private int VehicleId; //评论车辆
    private String content; //评价
    private int rating; //评价分数
    private LocalDateTime CommentTime; //评论时间

    public Comment() {
    }

    public Comment(int id, String username, int vehicleId, String content, int rating, LocalDateTime commentTime) {
        this.id = id;
        this.username = username;
        VehicleId = vehicleId;
        this.content = content;
        this.rating = rating;
        CommentTime = commentTime;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public int getVehicleId() {
        return VehicleId;
    }

    public void setVehicleId(int vehicleId) {
        VehicleId = vehicleId;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public int getRating() {
        return rating;
    }

    public void setRating(int rating) {
        this.rating = rating;
    }

    public LocalDateTime getCommentTime() {
        return CommentTime;
    }

    public void setCommentTime(LocalDateTime commentTime) {
        CommentTime = commentTime;
    }

    @Override
    public String toString() {
        return "Comment{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", VehicleId=" + VehicleId +
                ", content='" + content + '\'' +
                ", rating=" + rating +
                ", CommentTime=" + CommentTime +
                '}';
    }
}
